<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>我的相册</title>
    <link rel="stylesheet" type="text/css" href="<?php echo assets('css/style.css') ?>">
</head>
<body>
<div id="header">
    <div id="logo">Gallery</div>
    <ul>
        <li><a href="javascript:;"><?php echo $user->userName ?></a></li>
        <li><a href="<?php echo url('gallery/create') ?>">新建相册</a></li>
    </ul>
</div>
<div id="content">
    <?php if (count($galleryList) == 0): ?>
        <div id="new-gallery">还没有任何相册，点这里<a href="<?php echo url('gallery/create') ?>">创建</a>一个吧</div>
    <?php else: ?>
        <div id="wrapper">
            <ul>
                <?php foreach ($galleryList as $gallery): ?>
                    <li>
                        <img src="<?php echo $gallery->art ?>"/>
                        <div>
                            <h4>
                                <a href="<?php echo url('gallery/detail', ['id' => $gallery->id]) ?>"><?php echo $gallery->title ?></a>
                            </h4>
                        </div>
                    </li>
                <?php endforeach; ?>
            </ul>
        </div>
    <?php endif; ?>
</div>
<div id="footer">
    @copyright wanczy-php06 use for PHP OOP demo
</div>
</body>
</html>